import { createWebHashHistory, createRouter } from 'vue-router'
import DetailComponent from '@/components/ListDetail/DeailComponent.vue'
import ChartComponent from '@/components/StateChart/ChartComponent.vue'
import TakeComponent from '@/components/TakeAccount/TakeComponent.vue'
import InComeItem from '@/components/TakeAccount/TakeItem/InComeItem.vue'
import OutComeItem from '@/components/TakeAccount/TakeItem/OutComeItem.vue'
import InChart from '@/components/StateChart/InChart.vue'
import OutChart from '@/components/StateChart/OutChart.vue'
import TotalChart from '@/components/StateChart/TotalChart.vue'

const routes = [
  { path: '/', redirect: '/note/income' },
  {
    path: '/note/income',
    component: TakeComponent,
    children: [
      { path: '', component: InComeItem },
      { path: '/note/outcome', component: OutComeItem }
    ]
  },
  { path: '/show', component: DetailComponent },
  {
    path: '/collect/income',
    component: ChartComponent,
    children: [
      { path: '', component: InChart },
      { path: '/collect/outcome', component: OutChart },
      { path: '/collect/totalcome', component: TotalChart }
    ]
  }
]
const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
